package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;

import java.math.BigInteger;
import java.util.Objects;

public class UserChildSite extends DataObject {

    private long userId;

    private int siteIndex;
    /**
     * 剩余培养次数
     */
    private int trainTimes;
    /**
     * 上次培养次数恢复时间
     */
    private long lastRestoreTime;

    private String childUid;
    /**
     * 子嗣天资
     */
    private int childTalent;

    //0,普通，1男男2男女3女女4女男
    private int childType;

    private int childSex;

    private int childOccupation;

    private String childName;

    private String childName2;

    private int childHeadIcon;
    /**
     * 培养度
     */
    private int currentGrowth;

    private int motherBeautyId;

    private int trainType;       //培养方式

    private BigInteger trainCostSilver = BigInteger.ZERO;      //培养一次消耗银两

    private BigInteger growAddEarnSpeed = BigInteger.ZERO;      //成长增加的赚速

    private BigInteger growAddEarnSpeed2 = BigInteger.ZERO;     //双胞胎子嗣2成长增加的赚速

    private boolean comprehend;     //领悟


    public int getChildType() {
        return childType;
    }

    public void setChildType(int childType) {
        if(childType != this.childType){
            this.childType = childType;
            setUpdateOption();
        }
    }

    public String getChildName2() {
        return childName2;
    }

    public void setChildName2(String childName2) {
        if(!childName2.equals(this.childName2)){
            this.childName2 = childName2;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getSiteIndex() {
        return siteIndex;
    }

    public void setSiteIndex(int siteIndex) {
        if(this.siteIndex != siteIndex) {
            this.siteIndex = siteIndex;
            setUpdateOption();
        }
    }

    public int getTrainTimes() {
        return trainTimes;
    }

    public void setTrainTimes(int trainTimes) {
        if(this.trainTimes != trainTimes) {
            this.trainTimes = trainTimes;
            setUpdateOption();
        }
    }

    public long getLastRestoreTime() {
        return lastRestoreTime;
    }

    public void setLastRestoreTime(long lastRestoreTime) {
        if(this.lastRestoreTime != lastRestoreTime) {
            this.lastRestoreTime = lastRestoreTime;
            setUpdateOption();
        }
    }

    public String getChildUid() {
        return childUid;
    }

    public void setChildUid(String childUid) {
        if(!Objects.equals(this.childUid, childUid)) {
            this.childUid = childUid;
            setUpdateOption();
        }
    }

    public int getChildTalent() {
        return childTalent;
    }

    public void setChildTalent(int childTalent) {
        if(this.childTalent != childTalent) {
            this.childTalent = childTalent;
            setUpdateOption();
        }
    }

    public int getChildSex() {
        return childSex;
    }

    public void setChildSex(int childSex) {
        if(this.childSex != childSex) {
            this.childSex = childSex;
            setUpdateOption();
        }
    }

    public int getChildOccupation() {
        return childOccupation;
    }

    public void setChildOccupation(int childOccupation) {
        if(this.childOccupation != childOccupation) {
            this.childOccupation = childOccupation;
            setUpdateOption();
        }
    }

    public String getChildName() {
        return childName;
    }

    public void setChildName(String childName) {
        if (!Objects.equals(this.childName, childName)) {
            this.childName = childName;
            setUpdateOption();
        }
    }

    public int getChildHeadIcon() {
        return childHeadIcon;
    }

    public void setChildHeadIcon(int childHeadIcon) {
        if(this.childHeadIcon != childHeadIcon) {
            this.childHeadIcon = childHeadIcon;
            setUpdateOption();
        }
    }

    public int getCurrentGrowth() {
        return currentGrowth;
    }

    public void setCurrentGrowth(int currentGrowth) {
        if(this.currentGrowth != currentGrowth) {
            this.currentGrowth = currentGrowth;
            setUpdateOption();
        }
    }

    public int getMotherBeautyId() {
        return motherBeautyId;
    }

    public void setMotherBeautyId(int motherBeautyId) {
        if(this.motherBeautyId != motherBeautyId) {
            this.motherBeautyId = motherBeautyId;
            setUpdateOption();
        }
    }

    public int getTrainType() {
        return trainType;
    }

    public void setTrainType(int trainType) {
        if(this.trainType != trainType) {
            this.trainType = trainType;
            setUpdateOption();
        }
    }

    public BigInteger getTrainCostSilver() {
        return trainCostSilver;
    }

    public void setTrainCostSilver(BigInteger trainCostSilver) {
        if(!Objects.equals(this.trainCostSilver, trainCostSilver)) {
            this.trainCostSilver = trainCostSilver;
            setUpdateOption();
        }
    }

    public BigInteger getGrowAddEarnSpeed() {
        return growAddEarnSpeed;
    }

    public void setGrowAddEarnSpeed(BigInteger growAddEarnSpeed) {
        if(!Objects.equals(this.growAddEarnSpeed, growAddEarnSpeed)) {
            this.growAddEarnSpeed = growAddEarnSpeed;
            setUpdateOption();
        }
    }

    public BigInteger getGrowAddEarnSpeed2() {
        return growAddEarnSpeed2;
    }

    public void setGrowAddEarnSpeed2(BigInteger growAddEarnSpeed2) {
        if(!Objects.equals(this.growAddEarnSpeed2, growAddEarnSpeed2)) {
            this.growAddEarnSpeed2 = growAddEarnSpeed2;
            setUpdateOption();
        }
    }

    public boolean isComprehend() {
        return comprehend;
    }

    public void setComprehend(boolean comprehend) {
        if(this.comprehend != comprehend) {
            this.comprehend = comprehend;
            setUpdateOption();
        }
    }

    public UserChildSite clone(){
        UserChildSite cloneSite = new UserChildSite();
        cloneSite.setUserId(userId);
        cloneSite.setSiteIndex(siteIndex);
        cloneSite.setTrainTimes(trainTimes);
        cloneSite.setLastRestoreTime(lastRestoreTime);
        cloneSite.setChildUid(childUid);
        cloneSite.setChildTalent(childTalent);
        cloneSite.setChildType(childType);
        cloneSite.setChildSex(childSex);
        cloneSite.setChildOccupation(childOccupation);
        cloneSite.setChildName(childName);
        cloneSite.setChildName2(childName2);
        cloneSite.setChildHeadIcon(childHeadIcon);
        cloneSite.setCurrentGrowth(currentGrowth);
        cloneSite.setMotherBeautyId(motherBeautyId);
        cloneSite.setTrainType(trainType);
        cloneSite.setTrainCostSilver(trainCostSilver);
        cloneSite.setGrowAddEarnSpeed(growAddEarnSpeed);
        cloneSite.setGrowAddEarnSpeed2(growAddEarnSpeed2);
        return cloneSite;
    }
}
